package com.wsq.retrofitdemo.retrofit;

import com.wsq.retrofitdemo.model.response.IFlyAudioAddRes;
import com.wsq.retrofitdemo.model.response.IFlyBindResponse;
import com.wsq.retrofitdemo.model.response.IFlyCheckAudioRes;
import com.wsq.retrofitdemo.model.response.IFlyTaskAddRes;
import com.wsq.retrofitdemo.model.response.IFlyTrainTextRes;
import com.wsq.retrofitdemo.model.response.IFlyUploadVoiceRes;
import com.wsq.retrofitdemo.model.response.IFlyUserVoiceRes;

import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.Response;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;


/**
 * Date:2021/9/1
 * Time:16:53
 * author:wushengqi
 */
public interface Retrofit2Service {
//    String IFLY_BASE_PATH = "http://autotest.openspeech.cn/customer/v2/";
    String IFLY_BASE_PATH = "http://autopre-ht.iflytekauto.cn/customer/v2/";

    @FormUrlEncoded
    @POST("common_sound_record/user/bind")
    Call<IFlyBindResponse> bindUser(@FieldMap Map<String, String> userBind);

    @FormUrlEncoded
    @POST("common_sound_record/uservoice/list")
    Call<IFlyUserVoiceRes> getUserVoices(@FieldMap Map<String, String> voicesInfo);

    @FormUrlEncoded
    @POST("common_sound_record/train/text")
    Call<IFlyTrainTextRes> getTrainTexts(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("common_sound_record/train/taskadd")
    Call<IFlyTaskAddRes> taskAdd(@FieldMap Map<String, String> map);

    @Multipart
    @POST("common_sound_record/train/uploadfile/wav")
    Call<IFlyUploadVoiceRes> uploadVoice(@Part MultipartBody.Part file);

    @FormUrlEncoded
    @POST("common_sound_record/train/audioadd")
    Call<IFlyAudioAddRes> audioAdd(@FieldMap Map<String, String> map);

    @FormUrlEncoded
    @POST("common_sound_record/train/audiodetail")
    Call<IFlyCheckAudioRes> checkAudioDitail(@FieldMap Map<String, String> map);


}
